﻿@model SuperiorModel.SpecialPlaceModel
@{
    ViewBag.Title = "商品专场/专区设置";
    Layout = "~/Views/Shared/_Layout.cshtml";
    var menuList = ViewBag.MenuList;
}
<input type="hidden" id="mapRotute" map="map_SpecialPlace" />
<style>
    /*控制文本框长度*/
    .layui-upload-productlist img {
        width: 60px;
        height: 60px;
    }

    .layui-upload-productlist div {
        margin-left: 20px;
        float: left;
        margin-top: 10px;
    }

    .layui-upload-arealist div {
        margin-left: 20px;
        float: left;
        margin-top: 10px;
    }
</style>
<div class="title_ding">

    <p id="location">
        当前位置：
        商品专场/专区设置
    </p>
</div>
<div class="layui">
    <div class="shopmain">
        <div class="layui-card">
            <div class="layui-card-header">商品专场/专区设置</div>
            <div class="layui-card-body">

                <div class="layui-form" action="">
                    <div class="layui-form-item">
                        <label for="text_shopname" class="layui-form-label" style="width:118px;">
                            是否开启
                        </label>
                        <div class="layui-input-inline" style="width:50%">
                            @if (Model.OptionStatus == 1)
                            {
                                <input type="radio" name="text_status" value="1" title="是" checked>
                                <input type="radio" name="text_status" value="0" title="否">
                            }
                            else
                            {
                                <input type="radio" name="text_status" value="1" title="是">
                                <input type="radio" name="text_status" value="0" title="否" checked>
                            }

                        </div>
                        <div class="layui-form-mid layui-word-aux">
                            <span class="x-red">*</span>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label for="text_specialType" class="layui-form-label" style="width:118px;">
                            类型
                        </label>
                        <div class="layui-input-inline" style="width:50%">
                            @if (Model.SpecialType == 1)
                            {
                                <input type="radio" name="text_specialType" value="1" title="专场" checked>
                                <input type="radio" name="text_specialType" value="2" title="专区">
                            }
                            else
                            {
                                <input type="radio" name="text_specialType" value="1" title="专场">
                                <input type="radio" name="text_specialType" value="2" title="专区" checked>
                            }

                        </div>
                        <div class="layui-form-mid layui-word-aux">
                            <span class="x-red">*</span>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label for="PlaceName" class="layui-form-label">
                            专场名称
                        </label>
                        <div class="layui-input-inline" style="width:50%">
                            <input type="text" value="@Model.PlaceName" id="PlaceName" name="PlaceName" lay-verify="required" class="layui-input" placeholder="请输入专场名称">
                        </div>
                        <div class="layui-form-mid layui-word-aux">
                            <span class="x-red">*</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label for="Sorft" class="layui-form-label">
                            专场排序
                        </label>
                        <div class="layui-input-inline" style="width:50%">
                            <input type="text" value="@Model.Sorft" id="Sorft" name="Sorft" lay-verify="required|number" class="layui-input" placeholder="请输入专场排序,越小越靠前">
                        </div>
                        <div class="layui-form-mid layui-word-aux">
                            <span class="x-red">*</span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label for="MenuId" class="layui-form-label">
                            选择分类
                        </label>
                        <div class="layui-input-inline" style="width:50%">
                            <select name="MenuId" id="MenuId">
                                <option value="">请选择</option>
                                @foreach (var item in menuList)
                                {
                                    if (item.Id == Model.MenuId)
                                    {
                                        <option selected="selected" value="@item.Id">@item.MenuName</option>
                                    }
                                    else
                                    {
                                        <option value="@item.Id">@item.MenuName</option>
                                    }

                                }
                            </select>
                        </div>
                        <div class="layui-form-mid layui-word-aux">
                            <span class="x-red">*</span>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label for="text_servicephone" class="layui-form-label">
                            专场封面
                        </label>
                        <div class="layui-input-inline" style="width:50%">
                            <button type="button" class="layui-btn" id="btn_upload">
                                <i class="layui-icon">&#xe67c;</i>上传图片
                            </button>

                            <div class="layui-upload-list">
                                @if (!string.IsNullOrEmpty(Model.ImgPath))
                                {
                                    <div class="img_div">
                                        <img style="width:750px;height:350px;" class="layui-upload-img" src="@Model.ImgPath">
                                        <i class="layui-icon layui-icon-close-fill imgDelete"></i>
                                    </div>
                                }


                            </div>
                        </div>
                        <div class="layui-form-mid layui-word-aux">
                            <span class="x-red">*专场建议750*300最佳，专区建议150*140</span>
                        </div>
                    </div>

                    <div class="layui-form-item" style="text-align:center;">
                        <div class="layui-input-block" style="margin:0;">
                            <button class="layui-btn" lay-submit lay-filter="add" PlaceId="@Model.Id">提交</button>

                        </div>
                    </div>

                </div>

            </div>
        </div>
    </div>
</div>
<script src="~/scripts/Product/SpecialPlace.js"></script>
<script>
    SpecialPlaceClass.Instance.Init();
</script>